package com.wn.ziroombackend.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wn.ziroombackend.entity.Owner;
import com.wn.ziroombackend.mapper.OwnerMapper;
import com.wn.ziroombackend.service.OwnerService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wn.ziroombackend.vo.OwnerVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-27 10:56:29
 */
@Service
public class OwnerServiceImpl extends ServiceImpl<OwnerMapper, Owner> implements OwnerService {

    @Autowired
    private OwnerMapper ownerMapper;


    @Override
    public PageInfo<OwnerVo> getOwnerList(Integer num, Integer size, String quartersName, String ownerName) {

        PageHelper.startPage(num,size);
        List<OwnerVo> ownerVoList=ownerMapper.selectByPage(quartersName,ownerName);
        return new PageInfo<OwnerVo>(ownerVoList);

    }
}
